#!/bin/bash
set -x
USERHOST=$1
ICON=$2
TITLE=$3
tmpa=tmpa$$
ipconfig > $tmpa
num=$(grep -n hp.com < $tmpa | sed -e 's/:.*$//g')
ip=$(tail -n +$num < $tmpa | grep IP | sed -e "s/^.*: *//g" -e "s/\r//g")
rm -f $tmpa
/bin/ssh $USERHOST "export DISPLAY=$ip:0;/usr/bin/X11/hpterm -ls -bg white -fg black -sb -sbbg orange -bw 30 -ms blue -n $ICON -title '$TITLE' -sl 1600 " &
sleep 60
